import React, {Component} from 'react';

export default class ComponentList extends Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <div>
                <h3>评论列表</h3>
                <ul>
                    {
                        this.props.detail.map((item, index) => {
                            return (
                                <li key={index}>
                                    <span>{item.username}</span>
                                    &nbsp;&nbsp;
                                    <span>{item.content}</span>
                                    <hr/>
                                </li>
                            )
                        })
                    }
                </ul>
            </div>
        )
    }
} 